# Folder cache display - a smaller folder display of frequently visted folders.
#
# Copyright (c) 1993 Xerox Corporation.
# Use and copying of this software and preparation of derivative works based
# upon this software are permitted. Any distribution of this software or
# derivative works must comply with all applicable United States export
# control laws. This software is made available AS IS, and Xerox Corporation
# makes no warranty about the software, its performance or its conformity to
# any specification.
proc Fcache_Init {} {
global fcache exmh subFolders
global mhProfile flist
set fcache(folders) {}
if {[info exists exmh(newuser)] && [info exists subFolders]} {
set N [llength [array names subFolders]]
if {$N <= 2} {
set fcache(lines) 0
} elseif {$N < 10} {
set fcache(lines) 1
} else {
set fcache(lines) 2
}
}
Preferences_Add "Folder Cache" \
"Exmh can maintain a cache of buttons for recently used folders. Set the cache size to 0 (zero) to disable this feature. The cache appears as a second display below the main display of folder labels.
The cache is useful if you have lots of folders or a heavily nested folder structure. If you only have a few lines of folder labels, the cache probably just wastes space." {